
layui.use(['form','table'],function(){
    var form = layui.form,

        $ = layui.jquery,
        table = layui.table;

    //用户列表
    var tableIns=table.render({

        elem: '#carInfo',
        url : '/sharepark/platform/car',
        page : true,
        height : "full-100",
        limits : [10,20,30,40],
        limit : 10,
        id : "carInfo",
        text:{none:'暂无相关数据'},
        cols : [[
            {type: "checkbox", fixed:"left", width:50},
            {field: 'carNumber', title: '车牌号',  align:"center"},
            {field: 'uName', title: '租客姓名',align:'center',templet: '<div>{{d.userInfo.uName}}</div>' },
            {field: 'uSex', title: '租客性别', align:'center',templet: '<div>{{d.userInfo.uSex}}</div>'},
            {field: 'uTel', title: '租客电话',  align:'center',templet: '<div>{{d.userInfo.uTel}}</div>'},
            {field: 'uCredit', title: '租客信誉值',align:'center',templet: '<div>{{d.userInfo.uCredit}}</div>'}
            // {title: '操作', minWidth:175, templet:'#userListBar',fixed:"right",align:"center"}
        ]]
    });


    //搜索【此功能需要后台配合，所以暂时没有动态效果演示】
    $(".search_btn").on("click",function(){

        tableIns.reload({
            where: {
                "carNumber": $('#carNumber').val(),
                "userInfo.uName":$('#userName').val()

            }
            ,page: {
                curr: 1 //重新从第 1 页开始
            }
        });

    });



})
